package com.cqhfan.api.clients.interaction.fallback;

import com.cqhfan.api.clients.interaction.LikedRecordClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;

import java.util.Collections;
import java.util.Set;

/**
 * @author 眭传洪
 * @create 2025-08-14 17:50
 */
@Slf4j
public class LikedRecordClientFallbackFactory implements FallbackFactory<LikedRecordClient> {
    @Override
    public LikedRecordClient create(Throwable cause) {
        return new LikedRecordClient() {
            @Override
            public Set<Long> listLikeStatus(Iterable<Long> bizIds) {
                log.info("获取点赞记录失败");
                return Collections.emptySet();
            }
        };
    }
}
